<?php

namespace addons\qingdongams\validate;

use think\Validate;

//回款计划
class CustomerProduct extends Validate {
	/**
	 * 验证规则
	 */
	protected $rule = [
		'create_staff_id' => 'require|number',
		'customer_id'     => 'require|number',
		'product_id'      => 'require|number',
		'number'          => 'max:64',
		'pay_date'        => 'date',
		'over_date'       => 'date',

	];
	/**
	 * 提示消息
	 */
	protected $message = [];
	/**
	 * 字段描述
	 */
	protected $field = [
		'create_staff_id' => '员工',
		'customer_id'     => '所属客户',
		'product_id'      => '所属产品',
		'number'          => '产品编号',
		'pay_date'        => '支付时间',
		'over_date'       => '到期时间',
	];
	/**
	 * 验证场景
	 */
	protected $scene = [
		'create' => [
			'customer_id',
			'customer_id',
			'product_id',
			'number',
			'pay_date',
			'over_date',
		],
		'edit'   => [
			'product_id',
			'number',
			'pay_date',
			'over_date',
		],
	];
}
